#include <stdio.h>
#include <stdlib.h>

typedef struct
{
    int id;
    int value;
    int power;
} Data;

Data datas[100860];

int comparator(const void *p0, const void *p1)
{
    Data *a = (Data *)p0, *b = (Data *)p1;
    if (a->value == b->value)
    {
        return a->id < b->id ? -1 : 1;
    }
    
    return a->value > b->value ? -1 : 1;
}

int main(int argc, char const *argv[])
{
    int i, j;
    int n, r, q;

    scanf("%d%d%d", &n, &r, &q);

    q--;

    for (i = 0; i < n * 2; i++)
    {
        datas[i].id = i + 1; 
        datas[i].power = 0; 
        datas[i].value = 0; 
    }

    for (i = 0; i < n * 2; i++)
    {
        scanf("%d", &datas[i].value);
    }

    for (i = 0; i < n * 2; i++)
    {
        scanf("%d", &datas[i].power);
    }

    for (i = 0; i < r; i++)
    {
        qsort(datas, (size_t)(n * 2), sizeof(Data), comparator);

        for (j = 0; j < n * 2; j += 2)
        {
            if (datas[j].power > datas[j + 1].power)
            {
                datas[j].value++;
            }
            else if (datas[j + 1].power > datas[j].power)
            {
                datas[j + 1].value++;
            }
        }   
    }

    qsort(datas, (size_t)(n * 2), sizeof(Data), comparator);

    printf("%d", datas[q].id);

    return 0;
}
